package com.training.java.core.collections.one;

import java.util.List;

public class Dealer {

	private List<Car> inventory;
	public void loadCars(List<Car> cars) {
		this.inventory = cars;
	}
	
	public Car sellCar(String make, String model, int year)
	{
		for(Car car : inventory)
		{
			if(car.getMake().equals(make)&& car.getModel().equals(model)&& car.getYear()== year)
				return car;
		}
return null;
}
}